package Newsblog;
//小白月赛64小杜要迟到了！

import java.util.Scanner;

/**
 * @author :chenjie
 * @date :Created 2022/12/30 19:36
 */
public class DeeisgoingtobeLate {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int k=sc.nextInt();
        int a=sc.nextInt();
        int b=sc.nextInt();
        if((k-1+(n-1))*b<a*(n-1)){
            System.out.println(1);
        }else if((k-1+(n-1))*b==a*(n-1)){
            System.out.println(0);
        }else {
            System.out.println(2);
        }
    }
}
